<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@page import="com.manage.colligationQuery.ColligationQueryOfCarVo"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<link href="<%=basePath%>/images/css.css" rel="stylesheet" type="text/css">
<script language="javascript" type="text/javascript" src="<%=path%>/My97DatePicker/WdatePicker.js"/></script>
<script type="text/javascript" src="<%=path%>/js/jquery-1.9.1.min.js"></script>
<script>
	$(function(){
		$('#car1print').click(function(){
				$('#qqbzdetailform')[0].submit();
			});
			$('#car2print').click(function(){
			});
			$('#schoolprint').click(function(){
			});
	});
	function print(uri){
		window.open(uri);
	}
	var msg="${requestScope.rMsg}";
		if(msg!=""){
			alert(msg);
		}

</script>
<%	
	String value = "";
	String carid = "";
	String uri = "";
	ColligationQueryOfCarVo vo = new ColligationQueryOfCarVo();
	if(request.getAttribute("colligationQueryOfCarVo") !=null){
		 vo = (ColligationQueryOfCarVo)request.getAttribute("colligationQueryOfCarVo");
		 value = vo.getType();
		 carid = vo.getCarid();
		 if(value.equals("1")){
		 	uri = basePath+"print/printBussiCarArchive.action?method=printBussiCarArchive"+"&ids="+carid;
		 }else if(value.equals("2")){
		 	uri = basePath+"print/printSchoolCarArchive.action?method=printSchoolCarArchive"+"&ids="+carid;
		 }
	}
 %>
</head>

<body class="bg_003">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="201" height="30" align="center" background="<%=basePath%>/images/016.jpg"><table width="75%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="25"><img src="<%=basePath%>/images/1.png" width="16" height="16"></td>
        <td><strong>机动车信息查询</strong></td>
      </tr>
    </table></td>
    <td align="right" background="<%=basePath%>/images/017.jpg" class="zi_006">综合查询</td>
    <td width="39"><img src="<%=basePath%>/images/018.jpg" width="39" height="30"></td>
  </tr>
</table>
<form id="queryForm" name="queryForm" action="<%=path %>/system/colligationQueryOfCarMod.action" method="post">
		<% 
  				if(vo.getPlatenumber()==null){
					vo.setPlatenumber("");  				
  				}
  				if(vo.getPlatetype()==null){
  					vo.setPlatetype("");
  				}
  				if(vo.getNumber()==null){
  					vo.setNumber("");
  				}
  				if(vo.getColor()==null){
  					vo.setColor("");
  				}
  				if(vo.getBuytime()==null){
  					vo.setBuytime("");
  				}
  				if(vo.getForceinsurance()==null){
  					vo.setForceinsurance("");
  				}
  				if(vo.getYearlyinspection()==null){
  					vo.setYearlyinspection("");
  				}
  				if(vo.getCartype()==null){
  					vo.setCartype("");
  				}
  				if(vo.getManaglevel()==null){
  					vo.setManaglevel("");
  				}else if(vo.getManaglevel().equals("1")){
  					vo.setManaglevel("重点监控");
  				}else if(vo.getManaglevel().equals("2")){
  					vo.setManaglevel("侧重管理");
  				}else if(vo.getManaglevel().equals("3")){
  					vo.setManaglevel("一般巡查");
  				}
  				if(vo.getSecurityprotection()==null){
  					vo.setSecurityprotection("");
  				}else if(vo.getSecurityprotection().trim().equals("1")){
  					vo.setSecurityprotection("灭火器");
  				}else if(vo.getSecurityprotection().trim().equals("2")){
  					vo.setSecurityprotection("安全锤");
  				}else if(vo.getSecurityprotection().trim().equals("3")){
  					vo.setSecurityprotection("三角牌");
  				}
  				if(vo.getSerialnumber()==null){
  					vo.setSerialnumber("");
  				}
  				if(vo.getUsetype()==null){
  					vo.setUsetype("");
  				}else if(vo.getUsetype().equals("1")){
  					vo.setUsetype("营运车辆");
  				}else if(vo.getUsetype().equals("2")){
  					vo.setUsetype("非营运车辆");
  				}
  				if(vo.getName()==null){
  					vo.setName("");
  				}
  				if(vo.getMobilephone()==null){
  					vo.setMobilephone("");
  				}
  				if(vo.getTelephone()==null){
  					vo.setTelephone("");
  				}
  				if(vo.getIdcard()==null){
  					vo.setIdcard("");
  				}
  				if(vo.getSourcemode()==null){
  					vo.setSourcemode("");
  				}else if(vo.getSourcemode().equals("1")){
  					vo.setSourcemode("购买");
  				}else if(vo.getSourcemode().equals("2")){
  					vo.setSourcemode("转让");
  				}
  				if(vo.getAddress()==null){
  					vo.setAddress("");
  				}
  			 %>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="1" bgcolor="#e1e1e2"></td>
        <td height="100" align="center">
        <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#e1e1e1">
			<tr>
            <td width="10%" height="31" align="right" bgcolor="#f5f5f5">车辆号牌：</td>
            <td width="22%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfCarVo.platenumber" type="text" id="platenumber" size="14" disabled='true' value=<%=vo.getPlatenumber() %>></td>
            <td width="12%" height="31" align="right" bgcolor="#f5f5f5">品牌型号：</td>
            <td width="20%" height="31" bgcolor="#f5f5f5"><input size="14"  name="colligationQueryOfCarVo.platetype" type="text" id="platetype" width="100%" disabled='true' value=<%=vo.getPlatetype() %>></td>
            <td width="16%" height="31" align="right" bgcolor="#f5f5f5">核定人数：</td>
            <td width="20%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfCarVo.number" type="text" id="number" size="14" disabled='true' value=<%=vo.getNumber() %>></td>
          </tr>
          <tr>
            <td width="10%" height="31" align="right" bgcolor="#f5f5f5">车辆颜色：</td>
            <td width="22%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfCarVo.color" type="text" id="color" size="14" disabled='true' value=<%=vo.getColor() %>></td>
            <td width="12%" height="31" align="right" bgcolor="#f5f5f5">购车时间：</td>
            <td width="20%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfCarVo.buytime" type="text" id="buytime" size="14" disabled='true' value=<%=vo.getBuytime() %>></td>
        	<td width="16%" height="31" align="right" bgcolor="#f5f5f5">交强险到期时间：</td>
            <td width="20%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfCarVo.forceinsurance" type="text" id="forceinsurance" size="14" onFocus="WdatePicker({el:this,dateFmt:'yyyy年MM月dd日',maxDate:'#F{\'%y-%M\'}'})" value=<%=vo.getForceinsurance() %>></td>
          </tr>
          <tr>
            <td width="10%" height="31" align="right" bgcolor="#f5f5f5">年检时间：</td>
            <td width="22%" height="31" bgcolor="#f5f5f5"><input size="14"  name="colligationQueryOfCarVo.yearlyinspection" type="text" id="yearlyinspection" width="100%" onFocus="WdatePicker({el:this,dateFmt:'yyyy年MM月dd日',maxDate:'#F{\'%y-%M\'}'})" value=<%=vo.getYearlyinspection() %>></td>
        	<td width="12%" height="31" align="right" bgcolor="#f5f5f5">车辆类型：</td>
           	<td width="20%" height="31" bgcolor="#f5f5f5"><input size="14"  name="colligationQueryOfCarVo.cartype" type="text" id="cartype" width="100%" disabled='true' value=<%=vo.getCartype() %>></td>
            <td width="16%" height="31" align="right" bgcolor="#f5f5f5">管理级别：</td>
            <td width="20%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfCarVo.managlevel" type="text" id="managlevel" size="14" disabled='true' value=<%=vo.getManaglevel() %>></td>
          </tr>
           <tr>
            <td width="10%" height="31" align="right" bgcolor="#f5f5f5">安全防护：</td>
            <td width="22%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfCarVo.securityprotection" type="text" id="securityprotection" size="14" disabled='true' value=<%=vo.getSecurityprotection() %>></td>
            <td width="12%" height="31" align="right" bgcolor="#f5f5f5">车辆识别码：</td>
            <td width="22%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfCarVo.serialnumber" type="text" id="serialnumber" size="14" disabled='true' value=<%=vo.getSerialnumber() %>></td>
            <td width="16%" height="31" align="right" bgcolor="#f5f5f5">使用类型：</td>
           	<td width="20%" height="31" bgcolor="#f5f5f5"><input size="14"  name="colligationQueryOfCarVo.usetype" type="text" id="usetype" width="100%" disabled='true' value=<%=vo.getUsetype() %>></td>
          </tr>
          
          <tr>
            <td width="10%" height="31" align="right" bgcolor="#f5f5f5">所有人ID：</td>
            <td width="20%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfCarVo.name" type="text" id=name size="14" disabled='true' value=<%=vo.getName() %>></td>
         	<td width="12%" height="31" align="right" bgcolor="#f5f5f5">所有人电话：</td>
           	<td width="20%" height="31" bgcolor="#f5f5f5"><input size="14"  name="colligationQueryOfCarVo.mobilephone" type="text" id="mobilephone" width="100%" value=<%=vo.getMobilephone() %>></td>
            <td width="16%" height="31" align="right" bgcolor="#f5f5f5">所有人固定电话：</td>
            <td width="20%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfCarVo.telephone" type="text" id="telephone" size="14"  value=<%=vo.getTelephone() %>></td>
          </tr>
           <tr>
            <td width="10%" height="31" align="right" bgcolor="#f5f5f5">所有人身份证号：</td>
            <td width="22%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfCarVo.idcard" type="text" id="idcard" size="14" disabled='true' value=<%=vo.getIdcard() %>></td>
            <td width="12%" height="31" align="right" bgcolor="#f5f5f5">车辆获取方式:</td>
            <td width="22%" height="31" bgcolor="#f5f5f5"><input name="colligationQueryOfCarVo.sourcemode" type="text" id="sourcemode" size="14" disabled='true' value=<%=vo.getSourcemode() %>></td>
            <td width="16%" height="31" align="right" bgcolor="#f5f5f5">所有人居住地：</td>
           	<td width="20%" height="31" bgcolor="#f5f5f5"><input size="14"  name="colligationQueryOfCarVo.address" type="text" id="address" width="100%" disabled='true' value=<%=vo.getAddress() %>></td>
          </tr>
          <tr>
          	<td width="10%" height="31" align="right" bgcolor="#f5f5f5">车辆类别：</td>
            <td width="22%" height="31" bgcolor="#f5f5f5" align="left" colspan="5"><input name="colligationQueryOfCarVo.cartype" type="text" id="cartype" size="80" disabled="true" value="<%=vo.getCartype()%>"></td>
          </tr>
        </table>
        <table width="95%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="50" align="right"><input type="submit" id="subbutton" value="修改保存"></td>
            </tr>
          </table></td>
        <td width="1" bgcolor="#e1e1e2"><br></td>
      </tr>
    </table></td>
</form>
<form id="print1Form" name="print1Form" action="system/messengerregistration_print.action" method="post">
	<input type="hidden" name="printIds" id="printIds"/>
</form>
<%
	if ("2".equals(value)) {
%>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="50" align="right"><input type="submit" id="car1print" value="打印校车辆信息登记表" onclick="print('<%=uri%>')"></td>
  </tr>
</table>
<%
	} else if ("1".equals(value)) {
%>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="50" align="right"><input type="button" id="schoolprint" value="打印营运车信息登记表" onclick="print('<%=uri%>')"></td>
  </tr>
</table>
<%
	}
%>
<table width="603" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="26">&nbsp;</td>
  </tr>
</table>
</body>
</html>